package com.zy.ai.langgraph4j.node;

import lombok.extern.slf4j.Slf4j;
import org.bsc.langgraph4j.action.AsyncNodeAction;
import org.bsc.langgraph4j.prebuilt.MessagesState;

import java.util.HashMap;

import static org.bsc.langgraph4j.action.AsyncNodeAction.node_async;

/**
 * @BelongsProject: SmartBidAI
 * @BelongsPackage: com.zy.ai.langgraph4j.node
 * @Author: zhangyan
 * @CreateTime: 2025-09-03  21:14
 * @Description: TODO
 * @Version: 1.0
 */
@Slf4j
public class ZblcNode {

    public static AsyncNodeAction<MessagesState<String>> create() {
        return node_async(state -> {
            log.info("执行招标流程节点");

            // 生成招标流程示例内容
            String content = "招标流程示例：\n1. 发布招标公告\n2. 接收投标文件\n3. 资格审查\n4. 技术和商务评审\n5. 公示评标结果";

            // 返回 Map，key 对应节点名
            HashMap<String, Object> result = new HashMap<>();
            result.put("tender_process", content);

            return result;
        });
    }
}

